//
//  TSHeader.h
//  TengyunStation
//
//  Created by Johnny on 15/8/21.
//  Copyright (c) 2015年 xingrong. All rights reserved.
//

#ifndef TengyunStation_TSHeader_h
#define TengyunStation_TSHeader_h

#define SuccessSocket           @"00000"
#define WXAppKey                @"wx4987aa342167e3f6"
#define UmengAppKey             @"56419443e0f55a6718000596"

#define CheckString(obj)        (([obj isEqual:[NSNull null]] || obj == nil || [@"null" isEqual:obj]) ? @"" : obj)

#define IOS7AndLater    (([[UIDevice currentDevice].systemVersion floatValue] >= 7.0) ? YES : NO)
#define IOS8AndLater    (([[UIDevice currentDevice].systemVersion floatValue] >= 8.0) ? YES : NO)
#define iPhone5Later    (([UIScreen mainScreen].bounds.size.height >= 568) ? YES : NO)
#define UIColorFromRGB(rgbValue) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0 blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0]
#define UIColorFromRGBA(rgbValue,a) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0 blue:((float)(rgbValue & 0xFF))/255.0 alpha:a]

typedef NS_ENUM(NSInteger, ExpressSendType) {//快件配送类型
    ExpressSendTypeZiti = 0,//自提
    ExpressSendTypeVisit = 1,//上门
    ExpressSendTypeReturn = 2,//退件
};

//用户协议
#define FirstAgreement  @"FirstShowAgreement"
//新手指引
#define FirstGuideHome  @"HomeGuideFirst"
#define FirstGuideDaishou   @"DaishouGuideFirst"
#define FirstGuideReject    @"RejectGuideFirst"

#define ExpressIdLimit  @"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-*"
#define FloorLimit      @"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
#define TelephoneLimit  @"1234567890"//手机号输入限制
#define PwdMaxLength    20
#define PwdMinLength    6

#define OrangeColor     UIColorFromRGB(0xf06e00)//主色调小面积使用
#define MainTextColor   UIColorFromRGB(0x333333)//用于重要文字信息，内页文字标题
#define AssistTextColor UIColorFromRGB(0x777777)//用于普通文字段落，引导词
#define TipTextColor    UIColorFromRGB(0x999999)//用于辅助，次要文字信息，不可用文字及不可按按钮颜色
#define LineColor       UIColorFromRGB(0xd7d7d7)//用于分割线 标签描边
#define SpaceColor      UIColorFromRGB(0xebebeb)//用于分隔块底色
#define NavigationColor UIColorFromRGB(0xf7f7f7)//导航条颜色

#ifdef DEBUG
#   define DLog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);
#else
#   define DLog(...)
#endif

#endif
